package com.itheima.servletconfig;

import javax.servlet.*;
import java.io.IOException;

public class ServletConfigDemo02 implements Servlet {

    private ServletConfig config;
    @Override
    public void init(ServletConfig servletConfig) throws ServletException {
        config=servletConfig;
    }

    @Override
    public ServletConfig getServletConfig() {
        return config;
    }

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {


        ServletContext servletContext = config.getServletContext();
        System.out.println(servletContext);
    }

    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {

    }
}
